Summary of Printing Functions
Constants and Data Types
Tray Index Type
typedef long gxTrayIndex; /* specifies a paper tray */Tray Mapping Modes
enum { gxDefaultTrayMapping = (gxTrayMapping) 0, /* no tray has a defined paper type assigned */ gxConfiguredTrayMapping = (gxTrayMapping) 1 /* at least 1 tray has a paper type assigned */ }; typedef long gxTrayMapping;Job Format Modes
enum { gxGraphicsJobFormatMode = (gxJobFormatMode) 'grph', /* graphics and text */ gxTextJobFormatMode = (gxJobFormatMode) 'text', /* text */ gxPostScriptJobFormatMode = (gxJobFormatMode) 'post' /* PostScript */ }; typedef OSType gxJobFormatMode;Job Format Mode Table
struct gxJobFormatModeTable { long numModes; /* number of entries in modes field */ gxJobFormatMode modes[1]; /* array of mode constants */ }; typedef struct gxJobFormatModeTable gxJobFormatModeTable, *gxJobFormatModeTablePtr, **gxJobFormatModeTableHdl;The Panel Setup Structure
struct gxPanelSetupRecord { gxPrintingPanelKind panelKind; /* kind of program using panel */ short panelResId; /* resource ID of panel */ short resourceRefNum; /* resource file refnum of panel */ void *refCon; /* pointer to panel setup structure used to build panel */ }; typedef struct gxPanelSetupRecord gxPanelSetupRecord;Printing Panel Kinds
enum { gxApplicationPanel= (gxPrintingPanelKind) 0, /* an application panel */ gxExtensionPanel = (gxPrintingPanelKind) 1, /* printing extension panel */ gxDriverPanel = (gxPrintingPanelKind) 2 /* printer driver panel */ }; typedef long gxPrintingPanelKind;Functions
Reporting Information to the User
OSErr GXReportStatus(short statusID, unsigned short statusIndex); OSErr GXAlertTheUser(gxStatusRecord *status); OSErr GXGetPrintingAlert (short alertResId, ModalFilterProcPtr filterProc, short *itemHit); OSErr GXPrintingAlert(short iconId, short txtSize, short defaultTitleNum, short cancelTitleNum, short textLength, Ptr pAlertMsg, StringPtr actionTitle, StringPtr title2, StringPtr title3, StringPtr msgFont, ModalFilterProcPtr filterProc, short *itemHit, StringPtr alertTitle);Managing Paper Trays
OSErr GXCountTrays(gxTrayIndex *numTrays); OSErr GXGetTrayName(gxTrayIndex whichTray, Str31 trayName); OSErr GXGetTrayMapping(gxTrayMapping *trayMapping); OSErr GXSetTrayPaperType(gxTrayIndex whichTray, gxPaperType paper); OSErr GXGetTrayPaperType(gxTrayIndex whichTray, gxPaperType paper);Storing and Accessing Desktop Printer Data
OSErr GXWriteDTPData (Str31 dtpName, OSType theType, short theID, Handle theData); OSErr GXFetchDTPData (Str31 dtpName, OSType theType, short theID, Handle *theData);Adding a Panel to a Print Dialog Box
OSErr GXSetupDialogPanel(gxPanelSetupRecord *panelRec);Working With Application Imaging Options
OSErr GXAddPrinterViewDevice(gxPrinter printer, gxViewDevice viewDev); OSErr GXGetAvailableJobFormatModes (gxJobFormatModeTableHdl *modeTbl); OSErr GXSetPreferredJobFormatMode (gxJobFormatMode, Boolean directOnly);Printing Control Functions
gxJob GXGetJob (void); short GXGetMessageHandlerResFile (void); Boolean GXSpoolingAborted(void); OSErr GXJobIdle(void); OSErr GXHandleChooserMessage (gxJob *aJob, Str31 driverName, short message, short caller, StringPtr objName, StringPtr zoneName, ListHandle theList, long p2);Handling Error Conditions in a Message
void GXCleanupOpenConnection(void); void GXCleanupStartJob(void); void GXCleanupStartPage(void); void GXCleanupStartSendPage(void);Segmenting Message Override Code
OSErr GXPrintingDispatch (long selector, ...);
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help